//
//  StoreManager.h
//  ebox
//  店铺数据管理
//  Created by hzm on 16-7-21.
//  Copyright (c) 2016年 custom. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "EnumMacro.h"
//#import "ManageMistakeTableViewCell.h"

static NSString *s_channelAlipayNo = @"3003"; //支付通道号----3003：支付宝
static NSString *s_channelWechatNo = @"3004"; //支付通道号----3004：微信
static NSString *s_channelCashNo = @"cash";
static NSString *s_channelCardNo = @"bank";

// 收入数据
@interface IncomeInfo : NSObject

@property (nonatomic, copy) NSString *channelNo;
@property (nonatomic, assign) long long int moneyValue;

@end

// 收入明细
@interface IncomeDetail : NSObject

@property (nonatomic, copy) NSString *incomeId;
@property (nonatomic, copy) NSString *time;
@property (nonatomic, copy) NSString *userName;
@property (nonatomic, copy) NSString *userId;
@property (nonatomic, copy) NSString *orderId;
@property (nonatomic, copy) NSString *channelNo;
@property (nonatomic, copy) NSString *payRequestNo;
@property (nonatomic, copy) NSString *channelOrderId;
@property (nonatomic, copy) NSString *terminalName;
@property (nonatomic, assign) long long int moneyValue;
@property (nonatomic, assign) long long int receiptMoneyValue;
@property (nonatomic, assign) long long int refundValue;
@property (nonatomic, assign) NSInteger payType;
@property (nonatomic, assign) NSInteger status;

- (void)setIncomeDetail:(NSDictionary *)dic;

-(NSString *)getStatusName;

@end

// 订单明细
@interface OrderDetail : NSObject

@property (nonatomic, copy) NSString *orderSnapshotId;
@property (nonatomic, copy) NSString *creatorId;
@property (nonatomic, copy) NSString *statusName;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *goodsList;
@property (nonatomic, copy) NSString *createTime;
@property (nonatomic, copy) NSString *appId;
@property (nonatomic, copy) NSString *orderNo;
@property (nonatomic, copy) NSString *memberId;
@property (nonatomic, assign) long long int totalGoods;
@property (nonatomic, assign) long long int orderAmount;
@property (nonatomic, assign) NSInteger payStatus;

- (void)setOrderDetail:(NSDictionary *)dic;

@end


// 员工数据
@interface EmployeeInfo : NSObject

@property (nonatomic, copy) NSString *employeeId;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *mobile;
@property (nonatomic, copy) NSString *loginId;
@property (nonatomic, copy) NSString *memberId;
//@property (nonatomic, assign) UserRoleType userRole;
//@property (nonatomic, assign) UserType userType;
@property (nonatomic, copy) NSString *terminalId;
/**所属门店，每一个门店都是dict 包括 {"store_id" : "store_name" : "status" }*/
@property (nonatomic, retain) NSMutableArray *belongStores;

//附加
@property (nonatomic, copy) NSString *passward;
-(instancetype)initWithName:(NSString *)name andTerminalId:(NSString *)terminalId;

- (void)setEmployeeInfo:(NSDictionary *)dic;
- (void)copyBaseInfo:(EmployeeInfo *)info;
//当前登录账号转换为员工对象
-(void)setInfoByLoginUser;

//清空并重置所属门店
-(void)resetBelongStore:(NSArray *)stores;

//用户所属门店的id，返回数组
-(NSArray *)getBelongStoreIds;

-(NSString *)getUserRoleStr;

@end


// 广告数据
@interface AdInfo : NSObject

@property (nonatomic, copy) NSString *linkUrl;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *imageUrl;

- (void)setAdInfo:(NSDictionary *)dic;

@end

// 门店数据管理
@interface StoreManager : NSObject

// 经销商信息
@property (nonatomic, copy) NSString *angencyName;
@property (nonatomic, copy) NSString *angencyPhone;
@property (nonatomic, copy) NSString *angencyShadowId;

// 订单信息
@property (nonatomic, assign) NSInteger unpayOrderCount;
@property (nonatomic, assign) NSInteger payedOrderCount;
@property (nonatomic, retain) NSMutableArray *arrOrderList;
@property (nonatomic, retain) NSMutableArray *arrMoreOrder;

// 收入信息
@property (nonatomic, assign) long long int totalIncome;
@property (nonatomic, retain) NSMutableArray *arrIncomes;
@property (nonatomic, retain) NSMutableArray *arrIncomeList;
@property (nonatomic, retain) NSMutableArray *arrMoreIncome;

// 店铺信息
@property (nonatomic, copy) NSString *memberName;
@property (nonatomic, copy) NSString *settingStoreName;
@property (nonatomic, assign) NSInteger payType;
@property (nonatomic, copy) NSString *bindBank;
@property (nonatomic, copy) NSString *bankAccount;

// 创建或修改员工数据
@property (nonatomic, retain) EmployeeInfo *employee;

// 员工列表
@property (nonatomic, retain) NSMutableArray *arrEmployees;
@property (nonatomic, copy) NSString *employeeStoreId;  // 查看列表选择
@property (nonatomic, copy) NSString *currentSubStoreId;  // 当前选中的门店


// 差错未处理条数-首页的总数
@property (nonatomic, assign) NSInteger undealMistakeCount;
//// 差错处理分通道的记录数
//@property (nonatomic, strong) NSMutableArray *mistakeDetailRecord;
// 差错处理记录流水总数--单个通道--数据切换的时候要注意随时清0
@property (nonatomic, assign) NSInteger mistakeTotalCount;
// 差错处理记录流水列表
@property (nonatomic, strong) NSMutableArray *mistakeList;

// 广告列表
@property (nonatomic, retain) NSMutableArray *arrAdList;

// 上次发送验证码时间
@property (nonatomic, assign) NSTimeInterval lastSendTime;

////收款记录
@property (nonatomic,strong)NSMutableArray *selectEemployeeList; //待选的员工列表

+ (instancetype)sharedInstance;

@end
